home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / SocketServices.p < prev    next >
Text File  |  1996-05-01  |  22KB  |  693 lines

  1. {
  2.      File:        SocketServices.p
  3.  
  4.      Contains:    This file contains constants and data structures that
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT SocketServices;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __SOCKETSERVICES__}
  28. {$SETC __SOCKETSERVICES__ := 1}
  29.  
  30. {$I+}
  31. {$SETC SocketServicesIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __MIXEDMODE__}
  38. {$I MixedMode.p}
  39. {$ENDC}
  40.  
  41. {$PUSH}
  42. {$ALIGN MAC68K}
  43. {$LibExport+}
  44.  
  45. {$IFC FOR_SYSTEM7_ONLY }
  46. {
  47. ///////////////////////////////////////////////////////////////////////////////////////
  48.     TypeDefs for the Socket Services function codes
  49. }
  50.  
  51. TYPE
  52.     SS_BYTE                                = Byte;
  53.     SS_FLAGS8                            = Byte;
  54.     SS_IRQ                                = Byte;
  55.     SS_PWRLEVEL                            = Byte;
  56.     SS_ADAPTER                            = UInt16;
  57.     SS_BCD                                = UInt16;
  58.     SS_COUNT                            = UInt16;
  59.     SS_EDC                                = UInt16;
  60.     SS_FLAGS16                            = UInt16;
  61.     SS_PAGE                                = UInt16;
  62.     SS_PWRINDEX                            = UInt16;
  63.     SS_SIGNATURE                        = UInt16;
  64.     SS_SKTBITS                            = UInt16;
  65.     SS_SOCKET                            = UInt16;
  66.     SS_SPEED                            = UInt16;
  67.     SS_WINDOW                            = UInt16;
  68.     SS_WORD                                = UInt16;
  69.     SS_BASE                                = UInt32;
  70.     SS_FLAGS32                            = UInt32;
  71.     SS_OFFSET                            = UInt32;
  72.     SS_SIZE                                = UInt32;
  73.     SS_PTR                                = Ptr;
  74.     SS_RETCODE                            = OSErr;
  75.     SS_SCHARTBLPtr = ^SS_SCHARTBL;
  76.     SS_SCHARTBL = RECORD
  77.         sktCaps:                UInt16;                                    {     SS_FLAGS16 }
  78.         activeHigh:                UInt32;                                    {     SS_FLAGS32 }
  79.         activeLow:                UInt32;                                    {     SS_FLAGS32 }
  80.     END;
  81.  
  82.     SS_SISTRUCTPtr = ^SS_SISTRUCT;
  83.     SS_SISTRUCT = RECORD
  84.         bufferLength:            UInt16;                                    {     SS_WORD }
  85.         dataLength:                UInt16;                                    {     SS_WORD }
  86.         charTable:                SS_SCHARTBL;                            {     SS_FLAGS16 }
  87.     END;
  88.  
  89.  
  90. CONST
  91.     STR_SIZE                    = 24;
  92.  
  93. {  minimum string length }
  94.  
  95. TYPE
  96.     SS_VISTRUCTPtr = ^SS_VISTRUCT;
  97.     SS_VISTRUCT = RECORD
  98.         bufferLength:            UInt16;                                    {     SS_WORD }
  99.         dataLength:                UInt16;                                    {     SS_WORD }
  100.         szImplementor:            SInt8;                                    {     SS_WORD }
  101.         padding:                SInt8;                                    {      }
  102.     END;
  103.  
  104.     SS_ACHARTBLPtr = ^SS_ACHARTBL;
  105.     SS_ACHARTBL = RECORD
  106.         adpCaps:                UInt16;                                    {     SS_FLAGS16 }
  107.         activeHigh:                UInt32;                                    {     SS_FLAGS32 }
  108.         activeLow:                UInt32;                                    {     SS_FLAGS32 }
  109.     END;
  110.  
  111.     SS_PWRENTRYPtr = ^SS_PWRENTRY;
  112.     SS_PWRENTRY = RECORD
  113.         powerLevel:                SInt8;                                    {     SS_PWRLEVEL }
  114.         validSignals:            SInt8;                                    {     SS_FLAGS8 }
  115.     END;
  116.  
  117.     SS_AISTRUCTPtr = ^SS_AISTRUCT;
  118.     SS_AISTRUCT = RECORD
  119.         bufferLength:            UInt16;                                    {     SS_WORD }
  120.         dataLength:                UInt16;                                    {     SS_WORD }
  121.         charTable:                SS_ACHARTBL;
  122.         numPwrEntries:            UInt16;                                    {     SS_WORD }
  123.         pwrEntryPtr:            SS_PWRENTRYPtr;
  124.     END;
  125.  
  126.     SS_MEMWINTBLPtr = ^SS_MEMWINTBL;
  127.     SS_MEMWINTBL = RECORD
  128.         memWndCaps:                UInt16;                                    {     SS_FLAGS16 }
  129.         firstByte:                UInt32;                                    {     SS_BASE }
  130.         lastByte:                UInt32;                                    {     SS_BASE }
  131.         minSize:                UInt32;                                    {     SS_SIZE }
  132.         maxSize:                UInt32;                                    {     SS_SIZE }
  133.         reqGran:                UInt32;                                    {     SS_SIZE }
  134.         reqBase:                UInt32;                                    {     SS_SIZE }
  135.         reqOffset:                UInt32;                                    {     SS_SIZE }
  136.         slowest:                UInt16;                                    {     SS_SPEED }
  137.         fastest:                UInt16;                                    {     SS_SPEED }
  138.     END;
  139.  
  140.     SS_IOWINTBLPtr = ^SS_IOWINTBL;
  141.     SS_IOWINTBL = RECORD
  142.         ioWndCaps:                UInt16;                                    {     SS_FLAGS16 }
  143.         firstByte:                UInt32;                                    {     SS_BASE }
  144.         lastByte:                UInt32;                                    {     SS_BASE }
  145.         minSize:                UInt32;                                    {     SS_SIZE }
  146.         maxSize:                UInt32;                                    {     SS_SIZE }
  147.         reqGran:                UInt32;                                    {     SS_SIZE }
  148.         addrLines:                UInt16;                                    {     SS_COUNT }
  149.         eisaSlot:                SInt8;                                    {     SS_FLAGS8 }
  150.         padding:                SInt8;                                    {      }
  151.     END;
  152.  
  153.     SS_WISTRUCTPtr = ^SS_WISTRUCT;
  154.     SS_WISTRUCT = RECORD
  155.         bufferLength:            UInt16;                                    {     SS_WORD }
  156.         dataLength:                UInt16;                                    {     SS_WORD }
  157.         numTblEntries:            UInt16;                                    {     SS_WORD }
  158.         memWinTbl:                SS_MEMWINTBL;
  159.         ioWinTbl:                SS_IOWINTBL;
  160.     END;
  161.  
  162. {
  163. ------------------------------------------------------------------------------------------------------------------------------------------------
  164.     function selectors passed to Socket Service entry point
  165. ------------------------------------------------------------------------------------------------------------------------------------------------
  166. }
  167.  
  168. CONST
  169.     fnSSGetAdapterCount            = $80;
  170.     fnSSUnsupported81            = $81;
  171.     fnSSUnsupported82            = $82;
  172.     fnSSGetSSInfo                = $83;
  173.     fnSSInquireAdapter            = $84;
  174.     fnSSGetAdapter                = $85;
  175.     fnSSSetAdapter                = $86;
  176.     fnSSInquireWindow            = $87;
  177.     fnSSGetWindow                = $88;
  178.     fnSSSetWindow                = $89;
  179.     fnSSGetPage                    = $8A;
  180.     fnSSSetPage                    = $8B;
  181.     fnSSInquireSocket            = $8C;
  182.     fnSSGetSocket                = $8D;
  183.     fnSSSetSocket                = $8E;
  184.     fnSSGetStatus                = $8F;
  185.     fnSSResetSocket                = $90;
  186.     fnSSUnsupported91            = $91;
  187.     fnSSUnsupported92            = $92;
  188.     fnSSUnsupported93            = $93;
  189.     fnSSUnsupported94            = $94;
  190.     fnSSInquireEDC                = $95;
  191.     fnSSGetEDC                    = $96;
  192.     fnSSSetEDC                    = $97;
  193.     fnSSStartEDC                = $98;
  194.     fnSSPauseEDC                = $99;
  195.     fnSSResumeEDC                = $9A;
  196.     fnSSStopEDC                    = $9B;
  197.     fnSSReadEDC                    = $9C;
  198.     fnSSGetVendorInfo            = $9D;
  199.     fnSSAcknowledgeInterrupt    = $9E;
  200.     fnSSGetSetPriorHandler        = $9F;
  201.     fnSSGetSetSSAddr            = $A0;
  202.     fnSSGetAccessOffsets        = $A1;
  203.     fnSSUnsupportedA2            = $A2;
  204.     fnSSUnsupportedA3            = $A3;
  205.     fnSSUnsupportedA4            = $A4;
  206.     fnSSUnsupportedA5            = $A5;
  207.     fnSSUnsupportedA6            = $A6;
  208.     fnSSUnsupportedA7            = $A7;
  209.     fnSSUnsupportedA8            = $A8;
  210.     fnSSUnsupportedA9            = $A9;
  211.     fnSSUnsupportedAA            = $AA;
  212.     fnSSUnsupportedAB            = $AB;
  213.     fnSSUnsupportedAC            = $AC;
  214.     fnSSUnsupportedAD            = $AD;
  215.     fnSSVendorSpecific            = $AE;
  216.  
  217. {     SSVendorSpecificPB.function values }
  218.     fnVSReserved                = $00;
  219.     fnVSGetSocketLocationIcon    = $01;
  220.     fnVSGetSocketLocationText    = $02;
  221.     fnVSDoSocketLocalization    = $03;
  222.     fnVSAppleSocketCapabilities    = $04;
  223.     fnVSSleepWakeNotification    = $05;
  224.  
  225. {
  226. ------------------------------------------------------------------------------------------------------------------------------------------------
  227.     defines for the Socket Services function codes
  228. ------------------------------------------------------------------------------------------------------------------------------------------------
  229. }
  230.     AC_IND                        = 1;                            {  adapter characteristics }
  231.     AC_PWR                        = 2;
  232.     AC_DBW                        = 4;
  233.  
  234.     AS_POWERDOWN                = 1;
  235.     AS_MAINTAIN                    = 2;
  236.  
  237.     EC_UNI                        = 1;
  238.     EC_BI                        = 2;
  239.     EC_REGISTER                    = 4;
  240.     EC_MEMORY                    = 8;
  241.     EC_PAUSABLE                    = 16;
  242.     EC_WRITE                    = 16;
  243.  
  244.     ET_CHECK8                    = 1;
  245.     ET_SDLC16                    = 2;
  246.  
  247.     IF_MEMORY                    = 1;
  248.     IF_IO                        = 2;
  249.  
  250.     IRQ_HIGH                    = 64;
  251.     IRQ_ENABLE                    = 128;
  252.  
  253.     IRQ_MEMORY                    = 4;
  254.     IRQ_IO                        = 4;
  255.  
  256.     PS_ATTRIBUTE                = $01;
  257.     PS_ENABLED                    = $02;
  258.     PS_WP                        = $04;
  259.  
  260.     PWR_VCC                        = 128;                            {  Power pins in PwrEntry elements }
  261.     PWR_VPP1                    = 64;
  262.     PWR_VPP2                    = 32;
  263.  
  264.     SBM_WP                        = 1;
  265.     SBM_LOCKED                    = 2;
  266.     SBM_EJECT                    = 4;
  267.     SBM_INSERT                    = 8;
  268.     SBM_BVD1                    = 16;
  269.     SBM_BVD2                    = 32;
  270.     SBM_RDYBSY                    = 64;
  271.     SBM_CD                        = 128;
  272.  
  273.     SBM_LOCK                    = 16;
  274.     SBM_BATT                    = 32;
  275.     SBM_BUSY                    = 64;
  276.     SBM_XIP                        = 128;
  277.  
  278. {  Vendor Specific Apple Socket Capabilities  }
  279.     SBM_SLEEP_PWR                = 1;
  280.  
  281.     WC_COMMON                    = 1;
  282.     WC_IO                        = 2;
  283.     WC_ATTRIBUTE                = 4;
  284.     WC_TYPE_MASK                = 7;
  285.     WC_WAIT                        = 128;
  286.  
  287.     WC_BASE                        = 1;
  288.     WC_SIZE                        = 2;
  289.     WC_WENABLE                    = 4;
  290.     WC_8BIT                        = 8;
  291.     WC_16BIT                    = 16;
  292.     WC_BALIGN                    = 32;
  293.     WC_POW2                        = 64;
  294.     WC_CALIGN                    = 128;
  295.     WC_PAVAIL                    = 256;
  296.     WC_PSHARED                    = 512;
  297.     WC_PENABLE                    = 1024;
  298.     WC_WP                        = 2048;
  299.  
  300.     WC_INPACK                    = 128;
  301.     WC_EISA                        = 256;
  302.     WC_CENABLE                    = 512;
  303.  
  304.     WS_IO                        = 1;
  305.     WS_ENABLED                    = 2;
  306.     WS_16BIT                    = 4;
  307.  
  308.     WS_PAGED                    = 8;
  309.     WS_EISA                        = 16;
  310.     WS_CENABLE                    = 32;
  311.     WS_SWAP_LITTLE_TO_BIG_ENDIAN = 64;
  312.  
  313.     SS_SIG_VALUE                = $5353;                        {  'SS' }
  314.  
  315.     SS_CMPL_1_00                = $0100;                        {  compliant with rev 1.0 of SS standard }
  316.     SS_CMPL_1_01                = $0101;                        {  compliant with rev 1.01 of SS standard }
  317.     SS_CMPL_2_00                = $0200;                        {  compliant with rev 2.0 of SS standard }
  318.     SS_CMPL_2_10                = $0210;                        {  compliant with rev 2.1 of SS standard }
  319.  
  320. {
  321. ------------------------------------------------------------------------------------------------------------------------------------------------
  322.     Universal ProcPtr for Socket Service entry point
  323. ------------------------------------------------------------------------------------------------------------------------------------------------
  324. }
  325.  
  326. TYPE
  327.     PCCardSSEntryProcPtr = ProcPtr;  { FUNCTION PCCardSSEntry(fnCode: UInt16; callPB: Ptr; dataPtr: Ptr): INTEGER; }
  328.  
  329.     PCCardSSEntryUPP = UniversalProcPtr;
  330.  
  331. CONST
  332.     uppPCCardSSEntryProcInfo = $00000FA0;
  333.  
  334. FUNCTION NewPCCardSSEntryProc(userRoutine: PCCardSSEntryProcPtr): PCCardSSEntryUPP;
  335.     {$IFC NOT GENERATINGCFM }
  336.     INLINE $2E9F;
  337.     {$ENDC}
  338.  
  339. FUNCTION CallPCCardSSEntryProc(fnCode: UInt16; callPB: Ptr; dataPtr: Ptr; userRoutine: PCCardSSEntryUPP): INTEGER;
  340.     {$IFC NOT GENERATINGCFM}
  341.     INLINE $205F, $4E90;
  342.     {$ENDC}
  343. {
  344. ------------------------------------------------------------------------------------------------------------------------------------------------
  345.     Card Services calls used by a Socket Service
  346. ------------------------------------------------------------------------------------------------------------------------------------------------
  347. }
  348.  
  349. TYPE
  350.     CSEventEntryPBPtr = ^CSEventEntryPB;
  351.     CSEventEntryPB = RECORD
  352.         ssHandlerID:            UInt32;
  353.         adapter:                UInt16;
  354.         socket:                    UInt16;
  355.         message:                UInt16;
  356.         intrpBits:                SInt8;
  357.         padding:                SInt8;
  358.     END;
  359.  
  360.     PCCardCSEntryProcPtr = ProcPtr;  { PROCEDURE PCCardCSEntry(VAR pb: CSEventEntryPB); }
  361.  
  362.     PCCardCSEntryUPP = UniversalProcPtr;
  363.  
  364. CONST
  365.     uppPCCardCSEntryProcInfo = $000000C0;
  366.  
  367. FUNCTION NewPCCardCSEntryProc(userRoutine: PCCardCSEntryProcPtr): PCCardCSEntryUPP;
  368.     {$IFC NOT GENERATINGCFM }
  369.     INLINE $2E9F;
  370.     {$ENDC}
  371.  
  372. PROCEDURE CallPCCardCSEntryProc(VAR pb: CSEventEntryPB; userRoutine: PCCardCSEntryUPP);
  373.     {$IFC NOT GENERATINGCFM}
  374.     INLINE $205F, $4E90;
  375.     {$ENDC}
  376. { ------------        AddSocketServices        ------------                             }
  377.  
  378. TYPE
  379.     AddSocketServicesPBPtr = ^AddSocketServicesPB;
  380.     AddSocketServicesPB = RECORD
  381.         ssEntry:                PCCardSSEntryUPP;                        {  -> given to CS for its use }
  382.         csEntry:                PCCardCSEntryUPP;                        {  <- taken from CS so we know where to enter }
  383.         dataPtr:                UInt32;
  384.         attributes:                UInt32;
  385.         numAdapters:            UInt16;
  386.         numSockets:                UInt16;
  387.     END;
  388.  
  389. { ------------         ReplaceSocketServices    ------------                             }
  390.     ReplaceSocketServicesPBPtr = ^ReplaceSocketServicesPB;
  391.     ReplaceSocketServicesPB = RECORD
  392.         ssEntry:                PCCardSSEntryUPP;
  393.         oldSSEntry:                PCCardSSEntryUPP;
  394.         dataPtr:                UInt32;
  395.         socket:                    UInt16;
  396.         numSockets:                UInt16;
  397.         attributes:                UInt16;
  398.     END;
  399.  
  400. FUNCTION CSAddSocketServices(VAR pb: AddSocketServicesPB): OSErr;
  401.     {$IFC NOT GENERATINGCFM}
  402.     INLINE $7050, $AAF0;
  403.     {$ENDC}
  404. FUNCTION CSReplaceSocketServices(VAR pb: ReplaceSocketServicesPB): OSErr;
  405.     {$IFC NOT GENERATINGCFM}
  406.     INLINE $7051, $AAF0;
  407.     {$ENDC}
  408. {
  409. ------------------------------------------------------------------------------------------------------------------------------------------------
  410.     parameter blocks for each Socket Service function
  411. ------------------------------------------------------------------------------------------------------------------------------------------------
  412. }
  413.  
  414. TYPE
  415.     SSAcknowledgeInterruptPBPtr = ^SSAcknowledgeInterruptPB;
  416.     SSAcknowledgeInterruptPB = RECORD
  417.         adapter:                UInt16;                                    {     SS_ADAPTER }
  418.         sockets:                UInt16;                                    {     SS_SKTBITS }
  419.     END;
  420.  
  421.     SSGetAccessOffsetsPBPtr = ^SSGetAccessOffsetsPB;
  422.     SSGetAccessOffsetsPB = RECORD
  423.         adapter:                UInt16;                                    {     SS_ADAPTER }
  424.         mode:                    SInt8;                                    {     SS_BYTE }
  425.         reserved:                SInt8;                                    {     padding }
  426.         count:                    UInt16;                                    {     SS_COUNT }
  427.         buffer:                    Ptr;                                    {     SS_PTR }
  428.         numAvail:                UInt16;                                    {     SS_COUNT }
  429.     END;
  430.  
  431.     SSGetAdapterCountPBPtr = ^SSGetAdapterCountPB;
  432.     SSGetAdapterCountPB = RECORD
  433.         totalAdapters:            UInt16;                                    {     SS_COUNT }
  434.         sig:                    UInt16;                                    {     SS_SIGNATURE }
  435.     END;
  436.  
  437.     SSGetSetAdapterPBPtr = ^SSGetSetAdapterPB;
  438.     SSGetSetAdapterPB = RECORD
  439.         adapter:                UInt16;                                    {     SS_ADAPTER }
  440.         state:                    SInt8;                                    {     SS_FLAGS8 }
  441.         irqStatus:                SInt8;                                    {     SS_IRQ }
  442.     END;
  443.  
  444.     SSGetSetEDCPBPtr = ^SSGetSetEDCPB;
  445.     SSGetSetEDCPB = RECORD
  446.         adapter:                UInt16;                                    {     SS_ADAPTER }
  447.         edc:                    UInt16;                                    {     SS_EDC }
  448.         socket:                    UInt16;                                    {     SS_SOCKET }
  449.         state:                    SInt8;                                    {     SS_FLAGS8 }
  450.         edcType:                SInt8;                                    {     SS_FLAGS8 }
  451.     END;
  452.  
  453.     SSGetSetPagePBPtr = ^SSGetSetPagePB;
  454.     SSGetSetPagePB = RECORD
  455.         adapter:                UInt16;                                    {     SS_ADAPTER }
  456.         window:                    UInt16;                                    {     SS_WINDOW }
  457.         page:                    UInt16;                                    {     SS_PAGE }
  458.         state:                    SInt8;                                    {     SS_FLAGS8 }
  459.         reserved:                SInt8;                                    {     padding }
  460.         offset:                    UInt32;                                    {     SS_OFFSET }
  461.     END;
  462.  
  463.     SSGetSetPriorHandlerPBPtr = ^SSGetSetPriorHandlerPB;
  464.     SSGetSetPriorHandlerPB = RECORD
  465.         adapter:                UInt16;                                    {     SS_ADAPTER }
  466.         mode:                    SInt8;                                    {     SS_FLAGS8 }
  467.         reserved:                SInt8;                                    {     padding }
  468.         handler:                Ptr;                                    {     SS_PTR }
  469.     END;
  470.  
  471.     SSGetSetSocketPBPtr = ^SSGetSetSocketPB;
  472.     SSGetSetSocketPB = RECORD
  473.         adapter:                UInt16;                                    {     SS_ADAPTER }
  474.         socket:                    UInt16;                                    {     SS_SOCKET }
  475.         vccIndex:                UInt16;                                    {     SS_PWRINDEX }
  476.         vpp1Index:                UInt16;                                    {     SS_PWRINDEX }
  477.         vpp2Index:                UInt16;                                    {     SS_PWRINDEX }
  478.         scIntMask:                SInt8;                                    {     SS_FLAGS8 }
  479.         state:                    SInt8;                                    {     SS_FLAGS8 }
  480.         ctlInd:                    SInt8;                                    {     SS_FLAGS8 }
  481.         ireqRouting:            SInt8;                                    {     SS_IRQ }
  482.         ifType:                    SInt8;                                    {     SS_FLAGS8 }
  483.         padding:                SInt8;                                    {      }
  484.     END;
  485.  
  486.     SSGetSetSSAddrPBPtr = ^SSGetSetSSAddrPB;
  487.     SSGetSetSSAddrPB = RECORD
  488.         adapter:                UInt16;                                    {     SS_ADAPTER }
  489.         mode:                    SInt8;                                    {     SS_BYTE }
  490.         subfunc:                SInt8;                                    {     SS_BYTE }
  491.         numAddData:                UInt16;                                    {     SS_COUNT }
  492.         buffer:                    Ptr;                                    {     SS_PTR }
  493.     END;
  494.  
  495.     SSGetSetWindowPBPtr = ^SSGetSetWindowPB;
  496.     SSGetSetWindowPB = RECORD
  497.         adapter:                UInt16;                                    {     SS_ADAPTER }
  498.         window:                    UInt16;                                    {     SS_WINDOW }
  499.         socket:                    UInt16;                                    {     SS_SOCKET }
  500.         size:                    UInt32;                                    {     SS_SIZE }
  501.         state:                    SInt8;                                    {     SS_FLAGS8 }
  502.         reserved:                SInt8;                                    {     padding }
  503.         speed:                    UInt16;                                    {     SS_SPEED }
  504.         base:                    UInt32;                                    {     SS_BASE }
  505.     END;
  506.  
  507.     SSGetSSInfoPBPtr = ^SSGetSSInfoPB;
  508.     SSGetSSInfoPB = RECORD
  509.         adapter:                UInt16;                                    {     SS_ADAPTER }
  510.         compliance:                UInt16;                                    {     SS_BCD }
  511.         numAdapters:            UInt16;                                    {     SS_COUNT }
  512.         firstAdapter:            UInt16;                                    {     SS_ADAPTER }
  513.     END;
  514.  
  515.     SSGetStatusPBPtr = ^SSGetStatusPB;
  516.     SSGetStatusPB = RECORD
  517.         adapter:                UInt16;                                    {     SS_ADAPTER }
  518.         socket:                    UInt16;                                    {     SS_SOCKET }
  519.         cardState:                SInt8;                                    {     SS_FLAGS8 }
  520.         socketState:            SInt8;                                    {     SS_FLAGS8 }
  521.         ctlInd:                    SInt8;                                    {     SS_FLAGS8 }
  522.         ireqRouting:            SInt8;                                    {     SS_IRQ }
  523.         ifType:                    SInt8;                                    {     SS_FLAGS8 }
  524.         padding:                SInt8;                                    {      }
  525.     END;
  526.  
  527.     SSGetVendorInfoPBPtr = ^SSGetVendorInfoPB;
  528.     SSGetVendorInfoPB = RECORD
  529.         adapter:                UInt16;                                    {     SS_ADAPTER }
  530.         vendorInfoType:            SInt8;                                    {     SS_BYTE }
  531.         reserved:                SInt8;                                    {     padding }
  532.         buffer:                    Ptr;                                    {     SS_PTR }
  533.         release:                UInt16;                                    {     SS_BCD }
  534.     END;
  535.  
  536.     SSInquireAdapterPBPtr = ^SSInquireAdapterPB;
  537.     SSInquireAdapterPB = RECORD
  538.         adapter:                UInt16;                                    {     SS_ADAPTER }
  539.         buffer:                    Ptr;                                    {     SS_PTR }
  540.         numSockets:                UInt16;                                    {     SS_COUNT }
  541.         numWindows:                UInt16;                                    {     SS_COUNT }
  542.         numEDCs:                UInt16;                                    {     SS_COUNT }
  543.     END;
  544.  
  545.     SSInquireEDCPBPtr = ^SSInquireEDCPB;
  546.     SSInquireEDCPB = RECORD
  547.         adapter:                UInt16;                                    {     SS_ADAPTER }
  548.         edc:                    UInt16;                                    {     SS_EDC }
  549.         sockets:                UInt16;                                    {     SS_SKTBITS }
  550.         caps:                    SInt8;                                    {     SS_FLAGS8 }
  551.         types:                    SInt8;                                    {     SS_FLAGS8 }
  552.     END;
  553.  
  554.     SSInquireSocketPBPtr = ^SSInquireSocketPB;
  555.     SSInquireSocketPB = RECORD
  556.         adapter:                UInt16;                                    {     SS_ADAPTER }
  557.         socket:                    UInt16;                                    {     SS_SOCKET }
  558.         buffer:                    Ptr;                                    {     SS_PTR }
  559.         scIntCaps:                SInt8;                                    {     SS_FLAGS8 }
  560.         scRptCaps:                SInt8;                                    {     SS_FLAGS8 }
  561.         ctlIndCaps:                SInt8;                                    {     SS_FLAGS8 }
  562.         padding:                SInt8;                                    {      }
  563.     END;
  564.  
  565.     SSInquireWindowPBPtr = ^SSInquireWindowPB;
  566.     SSInquireWindowPB = RECORD
  567.         adapter:                UInt16;                                    {     SS_ADAPTER }
  568.         window:                    UInt16;                                    {     SS_WINDOW }
  569.         buffer:                    Ptr;                                    {     SS_PTR }
  570.         wndCaps:                SInt8;                                    {     SS_FLAGS8 }
  571.         reserved:                SInt8;                                    {     padding }
  572.         sockets:                UInt16;                                    {     SS_SKTBITS }
  573.     END;
  574.  
  575.     SSPauseEDCPBPtr = ^SSPauseEDCPB;
  576.     SSPauseEDCPB = RECORD
  577.         adapter:                UInt16;                                    {     SS_ADAPTER }
  578.         edc:                    UInt16;                                    {     SS_EDC }
  579.     END;
  580.  
  581.     SSReadEDCPBPtr = ^SSReadEDCPB;
  582.     SSReadEDCPB = RECORD
  583.         adapter:                UInt16;                                    {     SS_ADAPTER }
  584.         edc:                    UInt16;                                    {     SS_EDC }
  585.         value:                    UInt16;                                    {     SS_WORD }
  586.     END;
  587.  
  588.     SSResetSocketPBPtr = ^SSResetSocketPB;
  589.     SSResetSocketPB = RECORD
  590.         adapter:                UInt16;                                    {     SS_ADAPTER }
  591.         socket:                    UInt16;                                    {     SS_SOCKET }
  592.     END;
  593.  
  594.     SSResumeEDCPBPtr = ^SSResumeEDCPB;
  595.     SSResumeEDCPB = RECORD
  596.         adapter:                UInt16;                                    {     SS_ADAPTER }
  597.         edc:                    UInt16;                                    {     SS_EDC }
  598.     END;
  599.  
  600.     SSStartEDCPBPtr = ^SSStartEDCPB;
  601.     SSStartEDCPB = RECORD
  602.         adapter:                UInt16;                                    {     SS_ADAPTER }
  603.         edc:                    UInt16;                                    {     SS_EDC }
  604.     END;
  605.  
  606.     SSStopEDCPBPtr = ^SSStopEDCPB;
  607.     SSStopEDCPB = RECORD
  608.         adapter:                UInt16;                                    {     SS_ADAPTER }
  609.         edc:                    UInt16;                                    {     SS_EDC }
  610.     END;
  611.  
  612.     SSVendorSpecificPBPtr = ^SSVendorSpecificPB;
  613.     SSVendorSpecificPB = RECORD
  614.         vsFunction:                UInt16;                                    {     SS_WORD }
  615.         adapter:                UInt16;                                    {     SS_ADAPTER }
  616.         socket:                    UInt16;                                    {     SS_SOCKET }
  617.         bufferSize:                UInt16;                                    {     SS_WORD }
  618.         buffer:                    Ptr;                                    {     SS_PTR }
  619.         attributes:                UInt32;                                    {     SS_LONG }
  620.     END;
  621.  
  622. {     `attributes' constants  }
  623.  
  624. CONST
  625.     kSSGoingToSleep                = $00000001;
  626.     kSSWakingFromSleep            = $00000002;
  627.  
  628. {
  629. ------------------------------------------------------------------------------------------------------------------------------------------------
  630.     Non-specific Socket Services Functions
  631. ------------------------------------------------------------------------------------------------------------------------------------------------
  632. }
  633. FUNCTION SSGetAdapterCount(VAR pb: SSGetAdapterCountPB; dataPtr: Ptr): SS_RETCODE;
  634. {
  635. ------------------------------------------------------------------------------------------------------------------------------------------------
  636.     Adapter Functions
  637. ------------------------------------------------------------------------------------------------------------------------------------------------
  638. }
  639. FUNCTION SSAcknowledgeInterrupt(VAR pb: SSAcknowledgeInterruptPB; dataPtr: Ptr): SS_RETCODE;
  640. FUNCTION SSGetSetPriorHandler(VAR pb: SSGetSetPriorHandlerPB; dataPtr: Ptr): SS_RETCODE;
  641. FUNCTION SSGetSetSSAddr(VAR pb: SSGetSetSSAddrPB; dataPtr: Ptr): SS_RETCODE;
  642. FUNCTION SSGetAccessOffsets(VAR pb: SSGetAccessOffsetsPB; dataPtr: Ptr): SS_RETCODE;
  643. FUNCTION SSGetAdapter(VAR pb: SSGetSetAdapterPB; dataPtr: Ptr): SS_RETCODE;
  644. FUNCTION SSGetSSInfo(VAR pb: SSGetSSInfoPB; dataPtr: Ptr): SS_RETCODE;
  645. FUNCTION SSGetVendorInfo(VAR pb: SSGetVendorInfoPB; dataPtr: Ptr): SS_RETCODE;
  646. FUNCTION SSInquireAdapter(VAR pb: SSInquireAdapterPB; dataPtr: Ptr): SS_RETCODE;
  647. FUNCTION SSSetAdapter(VAR pb: SSGetSetAdapterPB; dataPtr: Ptr): SS_RETCODE;
  648. FUNCTION SSVendorSpecific(VAR pb: SSVendorSpecificPB; dataPtr: Ptr): SS_RETCODE;
  649. {
  650. ------------------------------------------------------------------------------------------------------------------------------------------------
  651.     Socket Functions
  652. ------------------------------------------------------------------------------------------------------------------------------------------------
  653. }
  654. FUNCTION SSGetSocket(VAR pb: SSGetSetSocketPB; dataPtr: Ptr): SS_RETCODE;
  655. FUNCTION SSGetStatus(VAR pb: SSGetStatusPB; dataPtr: Ptr): SS_RETCODE;
  656. FUNCTION SSInquireSocket(VAR pb: SSInquireSocketPB; dataPtr: Ptr): SS_RETCODE;
  657. FUNCTION SSResetSocket(VAR pb: SSResetSocketPB; dataPtr: Ptr): SS_RETCODE;
  658. FUNCTION SSSetSocket(VAR pb: SSGetSetSocketPB; dataPtr: Ptr): SS_RETCODE;
  659. {
  660. ------------------------------------------------------------------------------------------------------------------------------------------------
  661.     Window Functions
  662. ------------------------------------------------------------------------------------------------------------------------------------------------
  663. }
  664. FUNCTION SSGetPage(VAR pb: SSGetSetPagePB; dataPtr: Ptr): SS_RETCODE;
  665. FUNCTION SSGetWindow(VAR pb: SSGetSetWindowPB; dataPtr: Ptr): SS_RETCODE;
  666. FUNCTION SSInquireWindow(VAR pb: SSInquireWindowPB; dataPtr: Ptr): SS_RETCODE;
  667. FUNCTION SSSetPage(VAR pb: SSGetSetPagePB; dataPtr: Ptr): SS_RETCODE;
  668. FUNCTION SSSetWindow(VAR pb: SSGetSetWindowPB; dataPtr: Ptr): SS_RETCODE;
  669. {
  670. ------------------------------------------------------------------------------------------------------------------------------------------------
  671.     Error Detection Functions
  672. ------------------------------------------------------------------------------------------------------------------------------------------------
  673. }
  674. FUNCTION SSGetEDC(VAR pb: SSGetSetEDCPB; dataPtr: Ptr): SS_RETCODE;
  675. FUNCTION SSInquireEDC(VAR pb: SSInquireEDCPB; dataPtr: Ptr): SS_RETCODE;
  676. FUNCTION SSPauseEDC(VAR pb: SSPauseEDCPB; dataPtr: Ptr): SS_RETCODE;
  677. FUNCTION SSReadEDC(VAR pb: SSReadEDCPB; dataPtr: Ptr): SS_RETCODE;
  678. FUNCTION SSResumeEDC(VAR pb: SSResumeEDCPB; dataPtr: Ptr): SS_RETCODE;
  679. FUNCTION SSSetEDC(VAR pb: SSGetSetEDCPB; dataPtr: Ptr): SS_RETCODE;
  680. FUNCTION SSStartEDC(VAR pb: SSStartEDCPB; dataPtr: Ptr): SS_RETCODE;
  681. FUNCTION SSStopEDC(VAR pb: SSStopEDCPB; dataPtr: Ptr): SS_RETCODE;
  682. {$ENDC}
  683. {$ALIGN RESET}
  684. {$POP}
  685.  
  686. {$SETC UsingIncludes := SocketServicesIncludes}
  687.  
  688. {$ENDC} {__SOCKETSERVICES__}
  689.  
  690. {$IFC NOT UsingIncludes}
  691.  END.
  692. {$ENDC}
  693.